package com.an.trip.domain.bo;

import com.an.common.core.domain.BaseEntity;
import com.an.common.core.validate.AddGroup;
import com.an.common.core.validate.EditGroup;
import com.baomidou.mybatisplus.annotation.TableLogic;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 行程每日记录业务对象 trip_daily_record
 *
 * @author Ann
 * @date 2024-12-04
 */

@Data
@EqualsAndHashCode(callSuper = true)
public class TripDailyRecordBo extends BaseEntity {

    /**
     * 行程ID
     */
    @NotNull(message = "行程ID不能为空", groups = { EditGroup.class })
    private Long tripId;

    /**
     * 指派人
     */
    private Long assigner;

    /**
     * 出车人
     */
    @NotBlank(message = "出车人不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long driver;

    /**
     * 起点
     */
    @NotBlank(message = "起点不能为空", groups = { AddGroup.class, EditGroup.class })
    private String departureLocation;

    /**
     * 目的地
     */
    @NotBlank(message = "目的地不能为空", groups = { AddGroup.class, EditGroup.class })
    private String destination;

    /**
     * 行驶里程
     */
    private BigDecimal mileage;

    /**
     * 发车时间
     */
    @NotNull(message = "发车时间不能为空", groups = { AddGroup.class, EditGroup.class })
    private Date startTime;

    /**
     * 结束时间
     */
    @NotNull(message = "结束时间不能为空", groups = { AddGroup.class, EditGroup.class })
    private Date endTime;

    /**
     * 出车天数
     */
    private BigDecimal days;

    /**
     * 费用
     */
    @NotNull(message = "费用不能为空", groups = { AddGroup.class, EditGroup.class })
    private BigDecimal fare;

    /**
     * 0：未结账，1：已结账
     */
    @NotBlank(message = "0：未结账，1：已结账不能为空", groups = { AddGroup.class, EditGroup.class })
    private String settleStatus;

    /**
     * 结账人
     */
    private String settledBy;

    /**
     * 删除标志（0未删除 2已删除）
     */
    @TableLogic
    private String delFlag;
    /**
     * 备注
     */
    private String remark;


}
